package com.chezhujie.www.persistence;

import com.chezhujie.www.domain.Czjorder;
import com.chezhujie.www.domain.vo.BusinOrder;
import com.chezhujie.www.domain.vo.OrderDateVO;
import com.chezhujie.www.domain.vo.OrderIdAndDate;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
* 订单表
* Created by 汤伟杰 on 2017/5/23.
 */
@Repository
public interface CzjorderMapper {
    void insert(Czjorder czjorder);
    void update(Czjorder czjorder);
    void deleteById(String id);
    void deleteByIds(List<String> list);
    Czjorder queryById(String id);
    List<Czjorder> queryByIds(List<String> list);
    int getTotalRows(Map<String, Object> param);
    List<Map<String,Object>> getList(Map<String, Object> param);
    List<Map<String,Object>> listUserinfoId(Map<String, Object> param);
    List<Map<String,Object>> listBusinessId(Map<String, Object> param);
	List<BusinOrder> listOrderDetail(Map<String, Object> params);
	int getListOrderDetailRows(Map<String, Object> params);
	int getCzjactivityCount(Map<String, Object> map);

    Map<String,Object> getOrderedByNo(String orderNo);

    void updateOrderStatus(Map<String, Object> map);
	int getOrderBybusinessidRows(Map<String, Object> map);
	List<BusinOrder> getOrderBybusinessid(Map<String, Object> map);
	BusinOrder getOrderBybusinessidAndOrderId(Map<String, Object> map);
	List<Integer> getPays();
	int getPay1();
	int getPay2();

    Map<String,Object> sumSoldOut(String id);

    Map<String,Object> getSalesAmount(String id);

    List<Map<String,Object>> summarylist(Map<String, Object> param);

    int summarylistCount(Map<String, Object> param);

    Czjorder getOneBy(Map<String, Object> map);

    void saves(List<Czjorder> listorder);
    List<Map<String,Object>> getListby(Map<String, Object> map);
    
    List<OrderIdAndDate>  getOrderList(int index);
    
	void batchUpdateCzjOrder(OrderDateVO vo);
	List<Czjorder> getOrderByOrderCode(String orderCode);

    Map<String,Object> queryDetailById(String id);

    void deleteByOrderCode(String orderNo);

    int getApiListCount(Map<String, Object> param);

    List<Map<String,Object>> getApiListRow(Map<String, Object> param);
}
